The present invention relates to analog signal binary coding circuits, and more particularly to a binary coding circuit for quantizing the output of a photoelectric conversion element in an optical character reader adapted to optically convert characters or codes into a binary signal having two signal levels corresponding to a background region and a character or code region.
The term "character" as used herein is intended to means alphabets and character sets of all languages, numerals, etc. The term "code" as used herein is intended to mean bar codes, etc.
Such characters and codes are, in general, printed in black ink on a white printing sheet. The contrast between black and white permits distinguishing the characters and codes from the background. The printing sheet is not always white, however. Nevertheless, even in the case where the characters or codes are printed on colored sheets, the characters or codes can usually be clearly distinguished from the background.
Hereinafter, the part of a sheet where a character or code is printed or written will be referred to as "a character region", and the part of a sheet where nothing is printed or written will be referred to as "a background region". In addition, characters, numerals and codes will all be referred to merely as "characters", and a device for optically reading characters on a sheet will be referred to as "an optical character reading unit" or "optical character reader".
In a conventional optical character reader, the surface of a sheet on which characters are written or printed is scanned with a photoelectric conversion element, the outputs of the latter is converted into binary signals corresponding to character and background regions, and the binary signals are utilized to identify the characters.
In this operation, the surface of the sheet is irradiated by a light source, and light reflected from the surface of the sheet is applied through a lens system to the photoelectric conversion element, which generates an electrical signal in correspondence to the quantity of light incident thereon. The quantity of light incident on the photoelectric conversion element changes with the characters on the surface of the sheet. Since usually the character region is black while the background region is white, the quantity of light reflected, i.e., the intensity of light incident on the photoelectric conversion element, depends on the presence or absence of characters on the surface of the sheet.
Characters on a sheet are not, however, uniform in density, and accordingly, the analog output of the photoelectric converter element scanning the surface of the sheet is not precisely a binary signal; that is, it changes continuously and irregularly. Even in the case of characters printed by type, vertical lines are often different in width from horizontal lines in the character, and different characters have different numbers of strokes. Thus, the output of the photoelectric conversion element changes in multiple analog modes. Furthermore, it changes with time and changes spatially. That is, the output of the photoelectric conversion element is an analog signal which takes not only a maximum value and a minimum value for character and backgroud regions, but also various values therebetween.
The simplest method of binary coding such an analog density signal is to compare its signal level with a predetermined threshold level so that an output "1" or "0" is produced according to whether or not the signal level is higher than the threshold level. However, this method sometimes suffers from a difficulty that a character region can sometimes be determined erroneously as a background region, i.e., a character is not completely detected, or a background region detected as a character region, so that lines of a detected characters appear to overlap with one another. Accordingly, identification of characters and codes according to data binary coded by the above-described method is unavoidably in correct.
The reason why a character is not completely detected or its lines appear to overlap as described above resides in the use of a fixed threshold level for binary coding. Thus, the above-described method is applicable only to simple characters.
In order to overcome the above-described difficulty, a binary coding circuit has been proposed in which the threshold level changes with the output of the photoelectric conversion element. More specifically, the threshold level is so controlled that, when a character of a binary coded image is liable to be deformed because of a large difference in level between the background region and the character region, the binary coded image is made thinner, and when a character of a binary coded image is liable to be partially missed, the binary coded image is made thicker. Therefore, the binary coding circuit can binary code characters with high accuracy even if the characters differ in density to some extent.
No one threshold variation is most suitable for every kind and density of characters. However, in practice, since a character identifying section carrying out subsequent processing can identify an input binary coded image which is somewhat deformed in configuration, even if only one threshold level setting reference is provided for the binary coding circuit, the range of character densities is often sufficient for the binary coding circuit to correctly identify the characters.
However, it is generally difficult for the conventional binary coding circuit to provide optimum threshold levels for all characters of different densities by analog processing. Especially it is difficult for a binary coding circuit to binary code both extremely thick and dark characters and extremely thin and light characters satisfactorily. Even if it were possible for the circuit to do so, the operation often would be low in stability. Sometimes the best threshold level cannot be obtained, depending on the characteristics of the photoelectric conversion element employed.